﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using King.Engine.Core;
using Microsoft.Xna.Framework;
using King.Engine.GameObjects;
using King.Engine.Components;
using King.Engine.Content;

namespace King.Engine.Tester
{
    public class GameActivity : Activity
    {
        public Point PlayerSpawn;
        private Player _player;

        public GameActivity()
        {

        }

        protected override void OnStart()
        {
            ContentLoader.LoadLevel<GameActivity, MainLevelScheme>("Level1");
            
            _player = new Player(PlayerSpawn.X, PlayerSpawn.Y);
            AddGameObject(_player);
        }

        protected override void OnResume()
        {
            Screen.WorldSize = new Point(1000, 1000);
            Screen.ClampCamera = true;
        }


        protected override void UpdateAfterObjects(GameTime gameTime)
        {
            Screen.CenterAt(_player);
        }
    }
}
